﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Backend/mtpAdmin.master" AutoEventWireup="true"
    CodeFile="CreateUser.aspx.cs" Inherits="Backend_CreateUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="dvTitleContent">
        Quản lý người dùng :: Người dùng mới</div>
    <table width="100%">
        <tr>
            <td valign="top" style="width:30%">
                <fieldset>
                    <legend>Tạo người dùng mới</legend>
                    <table cellpadding="3" border="0" cellspacing="0">
                        <tr>
                            <td>
                                Tên đăng nhập:
                            </td>
                            <td>
                                <asp:TextBox ID="UsernameTextbox" runat="server" Width="200px" />
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="UsernameRequiredValidator" runat="server" ControlToValidate="UserNameTextbox"
                                    ForeColor="red" Display="Static" ErrorMessage="*" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Mật khẩu:
                            </td>
                            <td>
                                <asp:TextBox ID="PasswordTextbox" runat="server" TextMode="Password" 
                                    Width="200px" />
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="PasswordRequiredValidator" runat="server" ControlToValidate="PasswordTextbox"
                                    ForeColor="red" Display="Static" ErrorMessage="*" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Nhắc lại mật khẩu:
                            </td>
                            <td>
                                <asp:TextBox ID="PasswordConfirmTextbox" runat="server" TextMode="Password" 
                                    Width="200px" />
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="PasswordConfirmRequiredValidator" runat="server"
                                    ControlToValidate="PasswordConfirmTextbox" ForeColor="red" 
                                    Display="Static" ErrorMessage="*" />
                                <br />
                                <asp:CompareValidator ID="PasswordConfirmCompareValidator" runat="server" ControlToValidate="PasswordConfirmTextbox"
                                    ForeColor="red" Display="Static" ControlToCompare="PasswordTextBox" 
                                    ErrorMessage="*" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Địa chỉ email:
                            </td>
                            <td>
                                <asp:TextBox ID="EmailTextbox" runat="server" Width="200px" />
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="EmailRequiredValidator" runat="server" ControlToValidate="EmailTextbox"
                                    ForeColor="red" Display="Static" ErrorMessage="*" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Câu hỏi bảo mật:
                            </td>
                            <td>
                                <asp:TextBox ID="PasswordQuestionTextbox" runat="server" Width="200px" />
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="PasswordQuestionRequiredValidator" runat="server"
                                    ControlToValidate="PasswordQuestionTextbox" ForeColor="red" Display="Static"
                                    ErrorMessage="*" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Câu trả lời bảo mật:
                            </td>
                            <td>
                                <asp:TextBox ID="PasswordAnswerTextbox" runat="server" Width="200px" />
                            </td>
                            <td>
                                <asp:RequiredFieldValidator ID="PasswordAnswerRequiredValidator" runat="server" ControlToValidate="PasswordAnswerTextbox"
                                    ForeColor="red" Display="Static" ErrorMessage="*" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: center">
                                <asp:Button ID="CreateUserButton" Text="Create User" OnClick="CreateUser_OnClick"
                                    runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="Msg" ForeColor="maroon" runat="server" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
            <td valign="top" style="width: 70%">
                <fieldset>
                    <legend>Phân quyền quản trị</legend>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Chọn quyền cho người dùng.<br />
                    <asp:Repeater ID="UsersRoleList" runat="server">
                        <ItemTemplate>
                        <%-- OnCheckedChanged="RoleCheckBox_OnCheckedChanged" --%>
                            <asp:CheckBox runat="server" ID="RoleCheckBox" Text='<%# Container.DataItem %>'/>
                            <br />
                        </ItemTemplate>
                    </asp:Repeater>
                </fieldset>
            </td>
        </tr>
    </table>
</asp:Content>
